﻿using System;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000338 RID: 824
	public class TPivotInClause : TParseTreeNode
	{
		// Token: 0x170006E8 RID: 1768
		// (get) Token: 0x060021CE RID: 8654 RVA: 0x00334540 File Offset: 0x00332740
		// (set) Token: 0x060021CF RID: 8655 RVA: 0x00334548 File Offset: 0x00332748
		public virtual TSelectSqlStatement SubQuery
		{
			get
			{
				return this.subQuery;
			}
			set
			{
				this.subQuery = value;
			}
		}

		// Token: 0x170006E9 RID: 1769
		// (get) Token: 0x060021D0 RID: 8656 RVA: 0x00334551 File Offset: 0x00332751
		// (set) Token: 0x060021D1 RID: 8657 RVA: 0x00334559 File Offset: 0x00332759
		public virtual TResultColumnList Items
		{
			get
			{
				return this.items;
			}
			set
			{
				this.items = value;
			}
		}

		// Token: 0x060021D2 RID: 8658 RVA: 0x00334562 File Offset: 0x00332762
		public override void init(object arg1)
		{
			if (arg1 is TResultColumnList)
			{
				this.items = (TResultColumnList)arg1;
				return;
			}
			if (arg1 is TSelectSqlNode)
			{
				this.selectSqlNode = (TSelectSqlNode)arg1;
			}
		}

		// Token: 0x060021D3 RID: 8659 RVA: 0x0033458D File Offset: 0x0033278D
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.selectSqlNode != null)
			{
				this.subQuery = new TSelectSqlStatement(psql.dbvendor);
				this.subQuery.rootNode = this.selectSqlNode;
				this.subQuery.doParseStatement(psql);
			}
		}

		// Token: 0x060021D4 RID: 8660 RVA: 0x003345C6 File Offset: 0x003327C6
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060021D5 RID: 8661 RVA: 0x003345D6 File Offset: 0x003327D6
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.items != null)
			{
				this.items.accept(v);
			}
			if (this.subQuery != null)
			{
				this.subQuery.accept(v);
			}
			v.postVisit(this);
		}

		// Token: 0x04001AC3 RID: 6851
		private TResultColumnList items;

		// Token: 0x04001AC4 RID: 6852
		private TSelectSqlNode selectSqlNode;

		// Token: 0x04001AC5 RID: 6853
		private TSelectSqlStatement subQuery;
	}
}
